package com.cxb.apipassenger.remote;

import com.cxb.internalcommon.dto.ResponseResult;
import com.cxb.internalcommon.request.OrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.redis.connection.ReactiveClusterScriptingCommands;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-order")
public interface ServiceOrderClient {

    /**
     * 乘客下订单
     * @param orderRequest
     * @return
     */
    @PostMapping("/order/add")
    public ResponseResult add(@RequestBody OrderRequest orderRequest);

    //测试派单服务
    @GetMapping("/test-real-order/{orderId}")
    public String dispatch(@PathVariable("orderId")long orderId);
}
